import { currencys, payMethods, invoiceTypes, riseTypes } from '@/utils/enums'
// 01:抄送 00: 未轮到审核；0:当前待审⼈；1:通过；2:拒绝；3:转交；4:退回; 5:评论；6:他⼈已处理;
export const approveStatus = [
  {
    value: '01',
    label: '抄送'
  },
  {
    value: '00',
    label: '未轮到审核'
  },
  {
    value: '0',
    label: '审核中'
  },
  {
    value: '1',
    label: '通过'
  },
  {
    value: '2',
    label: '拒绝'
  },
  {
    value: '3',
    label: '转交'
  },
  {
    value: '4',
    label: '退回'
  },
  {
    value: '5',
    label: '评论'
  },
  {
    value: '6',
    label: '他⼈已处理'
  }
]
const quoteFormTem = [
  {
    type: 'input',
    field: 'name',
    label: '报价单名称'
  },
  {
    type: 'input',
    field: 'customerName',
    label: '客户名称'
  },
  {
    type: 'input',
    field: 'date',
    label: '报价日期',
    date: true,
    format: 'YYYY-MM-DD'
  },
  {
    type: 'input',
    field: 'amount',
    label: '报价金额',
    amount: true
  },
  {
    type: 'select',
    field: 'currency',
    label: '币种',
    options: currencys
  },
  {
    type: 'input',
    field: 'rate',
    label: '汇率',
    amount: true
  },
  {
    type: 'input',
    field: 'taxRate',
    label: '税率',
    amount: true
  },
  {
    type: 'input',
    field: 'remark',
    label: '备注'
  }
]

const contractFormTem = [
  {
    type: 'input',
    field: 'number',
    label: '合同编号'
  },
  {
    type: 'input',
    field: 'name',
    label: '合同名称'
  },
  {
    type: 'input',
    field: 'customerName',
    label: '客户名称'
  },
  {
    type: 'input',
    field: 'customerSignDate',
    label: '签约日期',
    format: 'YYYY-MM-DD',
    date: true
  },
  {
    type: 'input',
    field: 'amount',
    label: '合同金额',
    amount: true
  },
  {
    type: 'select',
    field: 'paymentMode',
    label: '付款方式',
    options: payMethods
  },
  {
    type: 'select',
    field: 'currency',
    label: '币种',
    options: currencys
  },
  {
    type: 'input',
    field: 'rate',
    label: '汇率',
    amount: true
  },
  {
    type: 'input',
    field: 'startDate',
    label: '开始日期',
    date: true,
    format: 'YYYY-MM-DD'
  },
  {
    type: 'input',
    field: 'endDate',
    label: '结束日期',
    date: true,
    format: 'YYYY-MM-DD'
  },
  {
    type: 'input',
    field: 'invoiceList',
    label: '开票地址',
    address: true
  },
  {
    type: 'input',
    field: 'receiveList',
    label: '收货地址',
    address: true
  },
  {
    type: 'input',
    field: 'specialTerms',
    label: '条款'
  },
  {
    type: 'input',
    field: 'remark',
    label: '备注'
  },
  {
    type: 'input',
    field: 'companySignatory',
    label: '客户签字人'

  },
  {
    type: 'input',
    field: 'companySignDate',
    label: '公司签字日期',
    date: true,
    format: 'YYYY-MM-DD'
  },
  {
    type: 'input',
    field: 'taxRate',
    label: '税率',
    amount: true
  }
]
const orderFormTem = [
  {
    type: 'input',
    field: 'customerName',
    label: '客户名称'

  },
  {
    type: 'input',
    field: 'placeOrderDate',
    label: '下单日期',
    date: true,
    format: 'YYYY-MM-DD'
  },
  {
    type: 'input',
    field: 'no',
    label: '合同编号'
  },
  {
    type: 'input',
    field: 'amount',
    label: '订单金额',
    amount: true

  },
  {
    type: 'input',
    field: 'companySignDate',
    label: '交货日期',
    date: true,
    format: 'YYYY-MM-DD'
  },
  {
    type: 'input',
    field: 'invoiceAddress',
    label: '开票地址',
    address: true
  },
  {
    type: 'input',
    field: 'receiveAddress',
    label: '收货地址',
    address: true
  },
  {
    type: 'input',
    field: 'remark',
    label: '备注'

  }

]
const payFormTem = [
  {
    type: 'input',
    field: 'customerName',
    label: '客户名称'

  },
  {
    type: 'input',
    field: 'contractNum',
    label: '合同编号'

  },
  {
    type: 'input',
    field: 'contractAmount',
    label: '合同金额',
    amount: true

  },
  {
    type: 'input',
    field: 'orderNo',
    label: '订单编号'

  },

  {
    type: 'input',
    field: 'orderAmount',
    label: '订单金额'

  },
  {
    type: 'input',
    field: 'paymentDate',
    label: '回款日期',
    date: true,
    format: 'YYYY-MM-DD'
  },
  {
    type: 'input',
    field: 'amount',
    label: '回款金额',
    amount: true
  },
  {
    type: 'select',
    field: 'paymentMode',
    label: '付款方式',
    options: payMethods

  },
  {
    type: 'input',
    field: 'remark',
    label: '备注'
  }

]
const invoiveFormTem = [
  {
    type: 'input',
    field: 'customerName',
    label: '客户名称'

  },
  {
    type: 'input',
    field: 'contractNo',
    label: '合同编号'

  },
  {
    type: 'input',
    field: 'contractAmount',
    label: '合同金额',
    amount: true
  },
  {
    type: 'input',
    field: 'orderNo',
    label: '订单编号'

  },
  {
    type: 'input',
    field: 'amount',
    label: '开票金额',
    amount: true
  },
  {
    type: 'select',
    field: 'type',
    label: '发票类型',
    options: invoiceTypes
  },
  {
    type: 'select',
    field: 'riseType',
    label: '抬头类型',
    options: riseTypes
  },
  {
    type: 'input',
    field: 'identifyCode',
    label: '纳税识别码'

  },
  {
    type: 'input',
    field: 'rise',
    label: '开票抬头'

  },
  {
    type: 'input',
    field: 'bank',
    label: '开户行'

  },
  {
    type: 'input',
    field: 'account',
    label: '开户账号'

  },
  {
    type: 'input',
    field: 'address',
    label: '开票地址',
    address: true

  },
  {
    type: 'input',
    field: 'phone',
    label: '电话'

  },
  {
    type: 'input',
    field: 'contacts',
    label: '联系人'

  },
  {
    type: 'input',
    field: 'mailAddress',
    label: '邮箱地址'

  },
  {
    type: 'input',
    field: 'remark',
    label: '备注'

  }
]

export const FormTem = {
  contractFormTem,
  quoteFormTem,
  orderFormTem,
  invoiveFormTem,
  payFormTem
}

